package vn.edu.ptithcm.pim.service;

import vn.edu.ptithcm.pim.dom.Task;

import java.util.List;

import vn.edu.ptithcm.pim.dao.TaskDao;
import vn.edu.ptithcm.pim.query.TaskQuery;

@SuppressWarnings({ "rawtypes" })
public class TaskService {
	private TaskDao taskDao;

	public TaskDao getTaskDao() {
		return taskDao;
	}

	public void setTaskDao(TaskDao taskDao) {
		this.taskDao = taskDao;
	}

	public void save(Task task) {
		taskDao.save(task);
	}

	public void saveOrUpdate(Task task) {
		taskDao.saveOrUpdate(task);
	}

	public void lock(Task task) {
		taskDao.lock(task);
	}

	public void delete(Task task) {
		taskDao.delete(task);
	}

	public Task merge(Task task) {
		return taskDao.merge(task);
	}

	public Task findById(java.lang.Long id) {
		return taskDao.findById(id);
	}

	public List findByProjectId(java.lang.Long projectId) {
		return taskDao.findByProjectId(projectId);
	}

	public List getAllTasksForCopyProject(java.lang.Long projectId) {
		return taskDao.getAllForCopyProject(projectId);
	}

	public Task findByCode(String code) {
		return taskDao.findByCode(code);
	}

	public List findByExample(Task task) {
		return taskDao.findByExample(task);
	}

	public List getAll() {
		return taskDao.getAll();
	}

	public long getMaximumId(Long projectId) {
		return taskDao.getMaximumId(projectId);
	}

	public int getNumberOfItems(Long projectId) {
		return taskDao.getNumberOfItems(projectId);
	}

	public List<Task> findByQuery(TaskQuery query, Long projectId) {
		return taskDao.findByQuery(query, projectId);
	}

	public void deleteById(Long id) {
		taskDao.deleteById(id);
	}

	public List filterByProjectId(java.lang.Long projectId, int max, int offset) {
		return taskDao.filterByProjectId(projectId, max, offset);
	}

	public int countFilterByProjectId(java.lang.Long projectId) {
		return taskDao.countFilterByProjectId(projectId);
	}

	public List getAllTasksHasAttachedfiles(java.lang.Long projectId) {
		return taskDao.getAllTasksHasAttachedfiles(projectId);
	}
}
